/*
 * CTbx_Process.h
 *
 *  Created on: 2012-3-27
 *      Author: li.zhaoping
 */

#ifndef CTBX_PROCESS_H_
#define CTBX_PROCESS_H_

#include "CProcess.h"


class CTbx_Process : public CProcess {
	public:
		CTbx_Process();
		virtual ~CTbx_Process();

	public:
		virtual bool Init(CTaskCallback *cb = 0);
		virtual bool UnInit();
		virtual process_type_t GetProcessType(const char* strUrl, const char* strRuler) {return PROCESS_FILE;};
		virtual bool ProcessBuffer(const char* buf, const char* strUrl, const char* strRuler);
		virtual bool ProcessFile(const char* sFile, const char* strUrl, const char* strRuler);
		virtual const char* GetRootRulerName() ;

	private:
		bool parserBuffer(const char* buf, const char* strUrl, const char* strRuler);
		bool parserFile(const char* sFile, const char* strUrl, const char* strRuler);

	private:
		CTaskCallback *cb_;


};

#endif /* CTBX_PROCESS_H_ */
